package dev.bong.dto;

import dev.bong.pojo.entity.Semester;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author: bong~
 * @description: TODO
 * @date: 2024/4/14 16:39
 * @version: 1.0
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class SemesterDTO {

    private String semester;
    private Integer semesterStatus;
    private Integer weekNum;

    public static Semester toSemester(SemesterDTO dto) {
        Semester semester=new Semester();
        semester.setSemester(dto.getSemester());
        semester.setSemesterStatus(dto.getSemesterStatus());
        semester.setWeekNum(dto.getWeekNum());
        return semester;
    }
}
